# -*- coding: utf-8 -*-
"""
Created on Sat Dec 31 09:15:31 2022

@author: s'wan
"""
import numpy as np

### 3,001 能解
arr=np.array([
    [8,1,5, 0,0,0, 0,0,0],
    [0,0,0, 9,0,0, 0,0,7],
    [0,3,7, 0,0,0, 1,0,8],
    
    [0,0,0, 0,9,0, 7,0,6],
    [0,4,0, 0,5,0, 0,1,0],
    [3,0,2, 0,1,0, 0,0,0],
    
    [1,0,9, 0,0,0, 3,4,0],
    [2,0,0, 0,0,6, 0,0,0],
    [0,0,0, 0,0,0, 6,5,1],
    ],np.object0)

### 6,001, 不能解，3次后 人工 置数 可解；答案唯一；这类问题如何破局？？
arr=np.array([
    [0,0,1, 3,5,0, 0,0,0],
    [0,3,0, 0,0,7, 0,0,0],
    [5,0,0, 0,0,0, 9,0,0],
    
    [7,0,0, 2,0,0, 4,0,0],
    [9,0,0, 0,0,0, 6,0,0],
    [0,2,0, 0,0,8, 0,0,7],
    
    [0,0,4, 6,8,0, 1,0,2],
    [0,0,0, 0,0,0, 0,8,0],
    [0,0,0, 0,0,4, 3,0,0],
    ],np.object0)

### 6,091 能解
arr=np.array([
    [1,0,0, 5,0,0, 0,9,0],
    [0,0,3, 0,4,0, 0,0,6],
    [0,0,0, 0,0,0, 0,3,0],
    
    [0,6,0, 0,0,7, 0,0,0],
    [4,0,9, 0,0,0, 8,0,5],
    [0,0,0, 6,0,0, 0,2,0],
    
    [0,9,0, 0,0,0, 0,0,0],
    [2,0,0, 0,5,0, 1,0,0],
    [0,4,0, 0,0,3, 0,0,8],
    ],np.object0)

### 8,001 能解
arr=np.array([
    [9,0,0, 6,0,0, 0,7,1],
    [7,0,0, 0,0,0, 0,0,0],
    [0,0,5, 0,7,2, 3,0,0],
    
    [0,0,9, 0,0,0, 0,0,6],
    [0,0,3, 0,0,0, 2,0,0],
    [5,0,0, 0,0,0, 1,0,0],
    
    [0,0,2, 7,8,0, 5,0,0],
    [0,0,0, 0,0,0, 0,0,4],
    [6,5,0, 0,0,9, 0,0,3],
    ],np.object0)

### 8,057 能解, 不能解
arr=np.array([
    [6,0,0, 0,0,7, 0,0,8],
    [0,5,0, 3,0,0, 9,7,0],
    [0,9,0, 0,4,0, 0,0,0],
    
    [3,0,0, 0,0,0, 0,2,0],
    [0,0,1, 0,5,0, 3,0,0],
    [0,4,0, 0,0,0, 0,0,5],
    
    [0,0,0, 0,1,0, 0,6,0],
    [0,1,8, 0,0,2, 0,3,0],
    [7,0,0, 4,0,0, 0,0,9],
    ],np.object0)

### 9,001 能解
arr=np.array([
    [0,7,0, 4,0,0, 6,0,2],
    [0,0,4, 0,9,0, 0,0,0],
    [1,0,0, 0,2,5, 0,0,0],
    
    [6,0,5, 0,0,0, 4,1,0],
    [0,0,7, 0,8,4, 0,6,5],
    [4,0,2, 0,0,0, 7,8,0],
    
    [8,0,0, 0,7,2, 0,0,0],
    [0,0,6, 0,4,0, 0,0,0],
    [0,9,0, 8,0,0, 1,0,4],
    ],np.object0)
### 9,050 能解
arr=np.array([
    [0,0,1, 0,2,0, 0,0,0],
    [9,8,0, 0,0,0, 2,0,0],
    [0,0,0, 4,0,0, 6,0,0],
    
    [0,0,5, 0,0,2, 9,0,0],
    [0,4,0, 0,8,0, 5,0,6],
    [8,0,0, 0,0,0, 0,0,0],
    
    [0,0,3, 5,0,4, 0,0,1],
    [0,6,2, 0,0,0, 0,4,0],
    [0,0,0, 0,1,0, 0,0,0],
    ],np.object0)
### 10,050, 能解
arr=np.array([
    [0,0,0, 0,0,0, 0,0,0],
    [0,3,8, 5,0,0, 4,1,0],
    [0,6,0, 7,0,0, 0,2,0],
    
    [0,0,0, 8,0,5, 3,4,0],
    [0,0,0, 0,9,0, 0,0,0],
    [0,1,7, 6,0,2, 0,0,0],
    
    [0,5,0, 0,0,3, 0,6,0],
    [0,7,2, 0,0,1, 5,8,0],
    [0,0,0, 0,0,0, 0,0,0],
    ],np.object0)

### 10,101 能解
arr=np.array([
    [1,0,0, 4,0,0, 0,0,5],
    [0,2,3, 0,0,0, 0,6,0],
    [0,0,0, 0,0,8, 0,7,0],
    
    [0,0,9, 0,5,0, 0,0,1],
    [0,0,0, 6,0,7, 0,0,0],
    [5,0,0, 0,2,0, 4,0,0],
    
    [0,3,0, 9,0,0, 0,0,0],
    [0,4,0, 0,0,0, 3,2,0],
    [7,0,0, 0,0,6, 0,0,9],
    ],np.object0)

### 网上 单元摒除法
arr=np.array([
    [8,0,0, 0,9,2, 0,0,0],
    [5,0,0, 0,3,0, 0,6,0],
    [0,1,0, 0,0,0, 0,9,0],
    
    [0,8,0, 0,7,0, 0,0,0],
    [0,0,9, 0,0,0, 0,8,2],
    [0,0,5, 0,2,0, 0,4,0],
    
    [6,0,3, 5,0,0, 4,0,0],
    [0,0,0, 1,0,0, 0,0,7],
    [0,0,0, 0,0,7, 9,0,0],
    ],np.object0)
